/* ============================================================

Copyright (c) 2007 Advanced Micro Devices, Inc.  All rights reserved.

Redistribution and use of this material is permitted under the following
conditions:

Redistributions must retain the above copyright notice and all terms of this
license.

In no event shall anyone redistributing or accessing or using this material
commence or participate in any arbitration or legal action relating to this
material against Advanced Micro Devices, Inc. or any copyright holders or
contributors. The foregoing shall survive any expiration or termination of
this license or any agreement or access or use related to this material.

ANY BREACH OF ANY TERM OF THIS LICENSE SHALL RESULT IN THE IMMEDIATE REVOCATION
OF ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL.

THIS MATERIAL IS PROVIDED BY ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT
HOLDERS AND CONTRIBUTORS "AS IS" IN ITS CURRENT CONDITION AND WITHOUT ANY
REPRESENTATIONS, GUARANTEE, OR WARRANTY OF ANY KIND OR IN ANY WAY RELATED TO
SUPPORT, INDEMNITY, ERROR FREE OR UNINTERRUPTED OPERATION, OR THAT IT IS FREE
FROM DEFECTS OR VIRUSES.  ALL OBLIGATIONS ARE HEREBY DISCLAIMED - WHETHER
EXPRESS, IMPLIED, OR STATUTORY - INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
ACCURACY, COMPLETENESS, OPERABILITY, QUALITY OF SERVICE, OR NON-INFRINGEMENT.
IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, REVENUE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED OR BASED ON ANY THEORY OF LIABILITY
ARISING IN ANY WAY RELATED TO THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE. THE ENTIRE AND AGGREGATE LIABILITY OF ADVANCED MICRO DEVICES,
INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT EXCEED TEN DOLLARS
(US $10.00). ANYONE REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL ACCEPTS
THIS ALLOCATION OF RISK AND AGREES TO RELEASE ADVANCED MICRO DEVICES, INC. AND
ANY COPYRIGHT HOLDERS AND CONTRIBUTORS FROM ANY AND ALL LIABILITIES,
OBLIGATIONS, CLAIMS, OR DEMANDS IN EXCESS OF TEN DOLLARS (US $10.00). THE
FOREGOING ARE ESSENTIAL TERMS OF THIS LICENSE AND, IF ANY OF THESE TERMS ARE
CONSTRUED AS UNENFORCEABLE, FAIL IN ESSENTIAL PURPOSE, OR BECOME VOID OR
DETRIMENTAL TO ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR
CONTRIBUTORS FOR ANY REASON, THEN ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE
THIS MATERIAL SHALL TERMINATE IMMEDIATELY. MOREOVER, THE FOREGOING SHALL
SURVIVE ANY EXPIRATION OR TERMINATION OF THIS LICENSE OR ANY AGREEMENT OR
ACCESS OR USE RELATED TO THIS MATERIAL.

NOTICE IS HEREBY PROVIDED, AND BY REDISTRIBUTING OR ACCESSING OR USING THIS
MATERIAL SUCH NOTICE IS ACKNOWLEDGED, THAT THIS MATERIAL MAY BE SUBJECT TO
RESTRICTIONS UNDER THE LAWS AND REGULATIONS OF THE UNITED STATES OR OTHER
COUNTRIES, WHICH INCLUDE BUT ARE NOT LIMITED TO, U.S. EXPORT CONTROL LAWS SUCH
AS THE EXPORT ADMINISTRATION REGULATIONS AND NATIONAL SECURITY CONTROLS AS
DEFINED THEREUNDER, AS WELL AS STATE DEPARTMENT CONTROLS UNDER THE U.S.
MUNITIONS LIST. THIS MATERIAL MAY NOT BE USED, RELEASED, TRANSFERRED, IMPORTED,
EXPORTED AND/OR RE-EXPORTED IN ANY MANNER PROHIBITED UNDER ANY APPLICABLE LAWS,
INCLUDING U.S. EXPORT CONTROL LAWS REGARDING SPECIFICALLY DESIGNATED PERSONS,
COUNTRIES AND NATIONALS OF COUNTRIES SUBJECT TO NATIONAL SECURITY CONTROLS.
MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF ANY
LICENSE OR AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL.

NOTICE REGARDING THE U.S. GOVERNMENT AND DOD AGENCIES: This material is
provided with "RESTRICTED RIGHTS" and/or "LIMITED RIGHTS" as applicable to
computer software and technical data, respectively. Use, duplication,
distribution or disclosure by the U.S. Government and/or DOD agencies is
subject to the full extent of restrictions in all applicable regulations,
including those found at FAR52.227 and DFARS252.227 et seq. and any successor
regulations thereof. Use of this material by the U.S. Government and/or DOD
agencies is acknowledgment of the proprietary rights of any copyright holders
and contributors, including those of Advanced Micro Devices, Inc., as well as
the provisions of FAR52.227-14 through 23 regarding privately developed and/or
commercial computer software.

This license forms the entire agreement regarding the subject matter hereof and
supersedes all proposals and prior discussions and writings between the parties
with respect thereto. This license does not affect any ownership, rights, title,
or interest in, or relating to, this material. No terms of this license can be
modified or waived, and no breach of this license can be excused, unless done
so in a writing signed by all affected parties. Each term of this license is
separately enforceable. If any term of this license is determined to be or
becomes unenforceable or illegal, such term shall be reformed to the minimum
extent necessary in order for this license to remain in effect in accordance
with its terms as modified by such reformation. This license shall be governed
by and construed in accordance with the laws of the State of Texas without
regard to rules on conflicts of law of any state or jurisdiction or the United
Nations Convention on the International Sale of Goods. All disputes arising out
of this license shall be subject to the jurisdiction of the federal and state
courts in Austin, Texas, and all defenses are hereby waived concerning personal
jurisdiction and venue of these courts.

============================================================ */
#ifndef _OPT_FFT_KERNEL_H_
#define _OPT_FFT_KERNEL_H_

#include <cstring>
#include <cstdio>
#include <cstdlib>

#define SIN_SHEET_SIZE 12
#define SWITCH_SHEET_SIZE 512
#define FILTER_SHEET_SIZE 1024

#define CONST_SIZE FILTER_SHEET_SIZE

int switch_sheet [] = {
	0, 1024, 512, 1536, 256, 1280, 768, 1792, 128, 1152, 640, 1664, 384, 1408, 896, 1920, 64, 1088, 576, 1600, 320, 1344, 832, 1856, 192, 1216, 704, 1728, 448, 1472, 960, 1984, 0, 1056, 544, 1568, 288, 1312, 800, 1824, 160, 1184, 672, 1696, 416, 1440, 928, 1952, 96, 1120, 608, 1632, 352, 1376, 864, 1888, 224, 1248, 736, 1760, 480, 1504, 992, 2016, 16, 1040, 528, 1552, 272, 1296, 784, 1808, 144, 1168, 656, 1680, 400, 1424, 912, 1936, 0, 1104, 592, 1616, 336, 1360, 848, 1872, 208, 1232, 720, 1744, 464, 1488, 976, 2000, 48, 1072, 560, 1584, 304, 1328, 816, 1840, 176, 1200, 688, 1712, 432, 1456, 944, 1968, 0, 1136, 624, 1648, 368, 1392, 880, 1904, 240, 1264, 752, 1776, 496, 1520, 1008, 2032, 8, 1032, 520, 1544, 264, 1288, 776, 1800, 0, 1160, 648, 1672, 392, 1416, 904, 1928, 72, 1096, 584, 1608, 328, 1352, 840, 1864, 200, 1224, 712, 1736, 456, 1480, 968, 1992, 40, 1064, 552, 1576, 296, 1320, 808, 1832, 0, 1192, 680, 1704, 424, 1448, 936, 1960, 104, 1128, 616, 1640, 360, 1384, 872, 1896, 232, 1256, 744, 1768, 488, 1512, 1000, 2024, 24, 1048, 536, 1560, 280, 1304, 792, 1816, 152, 1176, 664, 1688, 408, 1432, 920, 1944, 88, 1112, 600, 1624, 344, 1368, 856, 1880, 0, 1240, 728, 1752, 472, 1496, 984, 2008, 56, 1080, 568, 1592, 312, 1336, 824, 1848, 184, 1208, 696, 1720, 440, 1464, 952, 1976, 120, 1144, 632, 1656, 376, 1400, 888, 1912, 0, 1272, 760, 1784, 504, 1528, 1016, 2040, 4, 1028, 516, 1540, 0, 1284, 772, 1796, 132, 1156, 644, 1668, 388, 1412, 900, 1924, 68, 1092, 580, 1604, 324, 1348, 836, 1860, 196, 1220, 708, 1732, 452, 1476, 964, 1988, 36, 1060, 548, 1572, 0, 1316, 804, 1828, 164, 1188, 676, 1700, 420, 1444, 932, 1956, 100, 1124, 612, 1636, 356, 1380, 868, 1892, 228, 1252, 740, 1764, 484, 1508, 996, 2020, 20, 1044, 532, 1556, 276, 1300, 788, 1812, 148, 1172, 660, 1684, 404, 1428, 916, 1940, 84, 1108, 596, 1620, 0, 1364, 852, 1876, 212, 1236, 724, 1748, 468, 1492, 980, 2004, 52, 1076, 564, 1588, 308, 1332, 820, 1844, 180, 1204, 692, 1716, 436, 1460, 948, 1972, 116, 1140, 628, 1652, 0, 1396, 884, 1908, 244, 1268, 756, 1780, 500, 1524, 1012, 2036, 12, 1036, 524, 1548, 268, 1292, 780, 1804, 140, 1164, 652, 1676, 0, 1420, 908, 1932, 76, 1100, 588, 1612, 332, 1356, 844, 1868, 204, 1228, 716, 1740, 460, 1484, 972, 1996, 44, 1068, 556, 1580, 300, 1324, 812, 1836, 172, 1196, 684, 1708, 0, 1452, 940, 1964, 108, 1132, 620, 1644, 364, 1388, 876, 1900, 236, 1260, 748, 1772, 492, 1516, 1004, 2028, 28, 1052, 540, 1564, 284, 1308, 796, 1820, 156, 1180, 668, 1692, 412, 1436, 924, 1948, 92, 1116, 604, 1628, 348, 1372, 860, 1884, 220, 1244, 732, 1756, 0, 1500, 988, 2012, 60, 1084, 572, 1596, 316, 1340, 828, 1852, 188, 1212, 700, 1724, 444, 1468, 956, 1980, 124, 1148, 636, 1660, 380, 1404, 892, 1916, 252, 1276, 764, 1788, 0, 1532, 1020, 2044
};

int filter_sheet [] = {
	0x3efd3800, 0x3f885800, 0x40188e00, 0x406ffb00, 0x409ce580, 0x40c17400, 0x40ea0e80, 0x41096880, 0x411c5780, 0x412f3cc0, 0x41434040, 0x41574b00, 0x416a6b00, 0x417d8600, 0x4188b3e0, 0x4192a6a0, 0x419c4320, 0x41a5de80, 0x41afc580, 0x41b9adc0, 0x41c35200, 0x41ccf560, 0x41d6d680, 0x41e0b800, 0x41ea6160, 0x41f40a60, 0x41fde6e0, 0x4203e1e0, 0x4208b880, 0x420d8ee0, 0x42127b80, 0x42176850, 0x421c4050, 0x42211830, 0x422603b0, 0x422aef30, 0x422fc850, 0x4234a150, 0x42398bc0, 0x423e7660, 0x42435030, 0x42482a30, 0x424d13c0, 0x4251fd90, 0x4256d830, 0x425bb2e0, 0x42609bd0, 0x426584e0, 0x426a6020, 0x426f3b70, 0x427423f0, 0x42790c70, 0x427de830, 0x42816200, 0x4283d5f0, 0x428649e8, 0x4288b808, 0x428b2638, 0x428d99f8, 0x42900dc0, 0x42927c00, 0x4294ea58, 0x42975df0, 0x4299d188, 0x429c3ff8, 0x429eae78, 0x42a121e8, 0x42a39568, 0x42a603f8, 0x42a872a0, 0x42aae5f0, 0x42ad5950, 0x42afc800, 0x42b236b8, 0x42b4a9f0, 0x42b71d28, 0x42b98bf8, 0x42bbfad8, 0x42be6df0, 0x42c0e108, 0x42c35000, 0x42c5bef8, 0x42c831f8, 0x42caa4f8, 0x42cd1400, 0x42cf8308, 0x42d1f5f0, 0x42d468d8, 0x42d6d800, 0x42d94728, 0x42dbb9f0, 0x42de2cc0, 0x42e09bf8, 0x42e30b34, 0x42e57dec, 0x42e7f0a8, 0x42ea5ff0, 0x42eccf40, 0x42ef41e8, 0x42f1b49c, 0x42f423f0, 0x42f69354, 0x42f905ec, 0x42fb7890, 0x42fde7f4, 0x43002bb4, 0x430164fc, 0x43029e44, 0x4303d5fe, 0x43050dba, 0x430646fa, 0x43078038, 0x4308b7fc, 0x4309efc4, 0x430b28fa, 0x430c6234, 0x430d99fe, 0x430ed1c8, 0x43100afa, 0x43114430, 0x43127c00, 0x4313b3d6, 0x4314ed00, 0x4316262a, 0x43175dfa, 0x431895d6, 0x4319cefc, 0x431b0822, 0x431c3ffa, 0x431d77d6, 0x431eb0fa, 0x431fea1e, 0x432121f8, 0x432259dc, 0x432392f6, 0x4324cc1c, 0x432603fc, 0x43273be4, 0x432874fa, 0x4329ae18, 0x432ae5fc, 0x432c1de8, 0x432d56fc, 0x432e9014, 0x432fc7fe, 0x4330ffee, 0x433238fe, 0x4333720e, 0x4334a9fe, 0x4335e1ec, 0x43371afe, 0x4338540a, 0x43398bfe, 0x433ac3f2, 0x433bfcfc, 0x433d3606, 0x433e6dfa, 0x433fa5f4, 0x4340defa, 0x434217fe, 0x43434ff6, 0x434487f4, 0x4345c0f8, 0x4346f9fc, 0x434831f8, 0x434969f4, 0x434aa2f6, 0x434bdbfa, 0x434d13f8, 0x434e4bfc, 0x434f84f8, 0x4350bdf8, 0x4351f5f8, 0x43532dfc, 0x435466f8, 0x43559ff2, 0x4356d7f6, 0x43581000, 0x435948f8, 0x435a81f2, 0x435bb9f6, 0x435cf1fe, 0x435e2af4, 0x435f63ee, 0x43609bf8, 0x4361d404, 0x43630cf8, 0x436445ec, 0x43657df4, 0x4366b604, 0x4367eef6, 0x436927e8, 0x436a5ff6, 0x436b9808, 0x436cd0f8, 0x436e09e8, 0x436f41f8, 0x43707a08, 0x4371b2f8, 0x4372ebe8, 0x437423f6, 0x43755c08, 0x437694f6, 0x4377cde4, 0x437905f4, 0x437a3e0a, 0x437b76f8, 0x437cafe2, 0x437de7f6, 0x437f200e, 0x43802c7c, 0x4380c8f0, 0x438164fc, 0x43820108, 0x43829d7b, 0x438339f0, 0x4383d5fd, 0x4384720b, 0x43850e7c, 0x4385aaef, 0x438646fa, 0x4386e30a, 0x43877f7a, 0x43881bec, 0x4388b7f9, 0x43895407, 0x4389f079, 0x438a8ceb, 0x438b28f8, 0x438bc508, 0x438c617b, 0x438cfdeb, 0x438d99fa, 0x438e360a, 0x438ed27b, 0x438f6eeb, 0x43900afa, 0x4390a70a, 0x4391437b, 0x4391dfe9, 0x43927bfa, 0x4393180d, 0x4393b47b, 0x439450e9, 0x4394ecfa, 0x4395890d, 0x43962579, 0x4396c1ea, 0x43975dfb, 0x4397fa0f, 0x4398967b, 0x439932e9, 0x4399cefa, 0x439a6b0d, 0x439b077a, 0x439ba3e6, 0x439c3ffe, 0x439cdc13, 0x439d787e, 0x439e14eb, 0x439eb0ff, 0x439f4d13, 0x439fe97e, 0x43a085ed, 0x43a121ff, 0x43a1be15, 0x43a25a7f, 0x43a2f6ea, 0x43a392ff, 0x43a42f14, 0x43a4cb7f, 0x43a567ea, 0x43a603ff, 0x43a6a016, 0x43a73c80, 0x43a7d8e9, 0x43a874ff, 0x43a91115, 0x43a9ad7f, 0x43aa49e9, 0x43aae600, 0x43ab8217, 0x43ac1e7e, 0x43acbae9, 0x43ad56fd, 0x43adf315, 0x43ae8f7e, 0x43af2be6, 0x43afc7fe, 0x43b06415, 0x43b1007d, 0x43b19ce5, 0x43b238fd, 0x43b2d515, 0x43b3717f, 0x43b40de7, 0x43b4a9fe, 0x43b54618, 0x43b5e27e, 0x43b67ee6, 0x43b71afd, 0x43b7b716, 0x43b8537e, 0x43b8efe4, 0x43b98bfe, 0x43ba2818, 0x43bac47e, 0x43bb60e6, 0x43bbfcfe, 0x43bc9918, 0x43bd357d, 0x43bdd1e4, 0x43be6dfd, 0x43bf0a18, 0x43bfa67e, 0x43c042e4, 0x43c0defc, 0x43c17b16, 0x43c2177c, 0x43c2b3e1, 0x43c34ffc, 0x43c3ec17, 0x43c4887c, 0x43c524e1, 0x43c5c0fc, 0x43c65d16, 0x43c6f97c, 0x43c795e2, 0x43c831fc, 0x43c8ce16, 0x43c96a7a, 0x43ca06e0, 0x43caa2fa, 0x43cb3f16, 0x43cbdb7b, 0x43cc77e0, 0x43cd13fb, 0x43cdb018, 0x43ce4c7c, 0x43cee8e0, 0x43cf84fc, 0x43d02116, 0x43d0bd7c, 0x43d159e0, 0x43d1f5fc, 0x43d29218, 0x43d32e7b, 0x43d3cae0, 0x43d466fa, 0x43d50317, 0x43d59f7a, 0x43d63bdd, 0x43d6d7fa, 0x43d77416, 0x43d81078, 0x43d8acdc, 0x43d948f8, 0x43d9e515, 0x43da8179, 0x43db1ddc, 0x43dbb9f9, 0x43dc5617, 0x43dcf27a, 0x43dd8edd, 0x43de2af9, 0x43dec716, 0x43df6379, 0x43dfffdc, 0x43e09bfa, 0x43e13817, 0x43e1d479, 0x43e270dc, 0x43e30cf8, 0x43e3a916, 0x43e44578, 0x43e4e1dc, 0x43e57df8, 0x43e61a18, 0x43e6b679, 0x43e752db, 0x43e7eef6, 0x43e88b16, 0x43e92777, 0x43e9c3d8, 0x43ea5ff8, 0x43eafc17, 0x43eb9878, 0x43ec34da, 0x43ecd0f8, 0x43ed6d17, 0x43ee0978, 0x43eea5db, 0x43ef41f9, 0x43efde18, 0x43f07a78, 0x43f116da, 0x43f1b2f8, 0x43f24f16, 0x43f2eb78, 0x43f387da, 0x43f423f9, 0x43f4c018, 0x43f55c78, 0x43f5f8da, 0x43f694f8, 0x43f73116, 0x43f7cd78, 0x43f869da, 0x43f905f9, 0x43f9a218, 0x43fa3e78, 0x43fadada, 0x43fb76f6, 0x43fc1316, 0x43fcaf77, 0x43fd4bd6, 0x43fde7f6, 0x43fe8415, 0x43ff2074, 0x43ffbcd6, 0x44002c7a, 0x44007a8a, 0x4400c8ba, 0x440116ea, 0x440164fb, 0x4401b30b, 0x4402013a, 0x44024f6b, 0x44029d7a, 0x4402eb8a, 0x440339bb, 0x440387ea, 0x4403d5fb, 0x4404240b, 0x4404723a, 0x4404c06a, 0x44050e7a, 0x44055c8a, 0x4405aaba, 0x4405f8ea, 0x440646fa, 0x4406950a, 0x4406e33a, 0x4407316a, 0x44077f79, 0x4407cd8a, 0x44081bba, 0x440869ea, 0x4408b7fa, 0x4409060a, 0x44095439, 0x4409a26a, 0x4409f07a, 0x440a3e8a, 0x440a8cba, 0x440adaea, 0x440b28fa, 0x440b770a, 0x440bc53a, 0x440c136a, 0x440c6179, 0x440caf8a, 0x440cfdb9, 0x440d4be9, 0x440d99fa, 0x440de80a, 0x440e3639, 0x440e8469, 0x440ed27a, 0x440f208a, 0x440f6eb9, 0x440fbce9, 0x44100afa, 0x4410590a, 0x4410a739, 0x4410f569, 0x44114379, 0x44119189, 0x4411dfb9, 0x44122de9, 0x44127bf9, 0x4412ca09, 0x44131838, 0x44136668, 0x4413b478, 0x44140288, 0x441450b8, 0x44149ee8, 0x4414ecf8, 0x44153b09, 0x44158938, 0x4415d768, 0x44162578, 0x44167388, 0x4416c1b8, 0x44170fe8, 0x44175df9, 0x4417ac09, 0x4417fa38, 0x44184868, 0x44189678, 0x4418e488, 0x441932b8, 0x441980e8, 0x4419cef9, 0x441a1d09, 0x441a6b38, 0x441ab968, 0x441b0778, 0x441b5589, 0x441ba3b8, 0x441bf1e8, 0x441c4000, 0x441c8e10, 0x441cdc3f, 0x441d2a6f, 0x441d787f, 0x441dc690, 0x441e14bf, 0x441e62ef, 0x441eb100, 0x441eff10, 0x441f4d3f, 0x441f9b6f, 0x441fe97f, 0x44203790, 0x442085bf, 0x4420d3ef, 0x44212200, 0x44217010, 0x4421be3f, 0x44220c6f, 0x44225a7f, 0x4422a890, 0x4422f6bf, 0x442344ef, 0x44239300, 0x4423e110, 0x44242f3f, 0x44247d70, 0x4424cb80, 0x44251990, 0x442567bf, 0x4425b5ef, 0x44260400, 0x44265210, 0x4426a03f, 0x4426ee6e, 0x44273c7f, 0x44278a8f, 0x4427d8bf, 0x442826ee, 0x442874ff, 0x4428c310, 0x4429113e, 0x44295f6f, 0x4429ad7e, 0x4429fb8f, 0x442a49be, 0x442a97ef, 0x442ae600, 0x442b3410, 0x442b823f, 0x442bd06f, 0x442c1e7f, 0x442c6c8f, 0x442cbabf, 0x442d08ef, 0x442d56ff, 0x442da50f, 0x442df33f, 0x442e416f, 0x442e8f7f, 0x442edd8f, 0x442f2bbf, 0x442f79ee, 0x442fc7ff, 0x4430160f, 0x4430643e, 0x4430b26f, 0x4431007f, 0x44314e8e, 0x44319cbe, 0x4431eaef, 0x443238ff, 0x4432870f, 0x4432d53e, 0x4433236f, 0x4433717e, 0x4433bf8e, 0x44340dbe, 0x44345bee, 0x4434a9ff, 0x4434f80f, 0x4435463e, 0x4435946e, 0x4435e27e, 0x4436308e, 0x44367ebe, 0x4436ccee, 0x44371afe, 0x4437690e, 0x4437b73e, 0x4438056e, 0x4438537e, 0x4438a18e, 0x4438efbe, 0x44393dee, 0x44398bfe, 0x4439da0d, 0x443a283d, 0x443a766d, 0x443ac47d, 0x443b128c, 0x443b60bd, 0x443baeed, 0x443bfcfd, 0x443c4b0d, 0x443c993c, 0x443ce76d, 0x443d357c, 0x443d838c, 0x443dd1bc, 0x443e1fee, 0x443e6dfe, 0x443ebc0c, 0x443f0a3c, 0x443f586d, 0x443fa67c, 0x443ff48c, 0x444042bc, 0x444090ed, 0x4440defd, 0x44412d0c, 0x44417b3c, 0x4441c96d, 0x4442177c, 0x4442658c, 0x4442b3bc, 0x444301ed, 0x44434ffe, 0x44439e0d, 0x4443ec3d, 0x44443a6e, 0x4444887e, 0x4444d68c, 0x444524bd, 0x444572ee, 0x4445c0fe, 0x44460f0c, 0x44465d3d, 0x4446ab6e, 0x4446f97d, 0x4447478c, 0x444795bd, 0x4447e3ee, 0x444831fe, 0x4448800b, 0x4448ce3c, 0x44491c6e, 0x44496a7c, 0x4449b88b, 0x444a06bc, 0x444a54ee, 0x444aa2fe, 0x444af10b, 0x444b3f3c, 0x444b8d6e, 0x444bdb7d, 0x444c298b, 0x444c77bc, 0x444cc5ef, 0x444d13fd, 0x444d620a, 0x444db03c, 0x444dfe6e, 0x444e4c7c, 0x444e9a8a, 0x444ee8bc, 0x444f36ed, 0x444f84fc, 0x444fd30a, 0x4450213c, 0x44506f6e, 0x4450bd7c, 0x44510b8a, 0x445159bc, 0x4451a7ee, 0x4451f5fe, 0x4452440a, 0x4452923c, 0x4452e06e, 0x44532e7c, 0x44537c89, 0x4453cabc, 0x445418ee, 0x445466fc, 0x4454b509, 0x4455033c, 0x4455516e, 0x44559f7c, 0x4455ed89, 0x44563bbc, 0x445689ee, 0x4456d7fd, 0x44572609, 0x4457743b, 0x4457c26e, 0x4458107c, 0x44585e88, 0x4458acbb, 0x4458faee, 0x445948fc, 0x44599708, 0x4459e53c, 0x445a336f, 0x445a817c, 0x445acf88, 0x445b1dbb, 0x445b6bef, 0x445bb9fc, 0x445c0808, 0x445c563b, 0x445ca46e, 0x445cf27b, 0x445d4088, 0x445d8eba, 0x445ddcef, 0x445e2afc, 0x445e7907, 0x445ec73b, 0x445f156f, 0x445f637c, 0x445fb187, 0x445fffbb, 0x44604df0, 0x44609bfc, 0x4460ea08, 0x4461383b, 0x4461866f, 0x4461d47b, 0x44622286, 0x446270ba, 0x4462beee, 0x44630cfb, 0x44635b06, 0x4463a93a, 0x4463f770, 0x4464457a, 0x44649386, 0x4464e1ba, 0x44652ff0, 0x44657dfc, 0x4465cc05, 0x44661a3a, 0x44666870, 0x4466b67a, 0x44670484, 0x446752ba, 0x4467a0f0, 0x4467eefb, 0x44683d04, 0x44688b3a, 0x4468d970, 0x4469277b, 0x44697584, 0x4469c3ba, 0x446a11f0, 0x446a5ffe, 0x446aae08, 0x446afc3d, 0x446b4a74, 0x446b987e, 0x446be687, 0x446c34bd, 0x446c82f3, 0x446cd0fe, 0x446d1f06, 0x446d6d3d, 0x446dbb74, 0x446e097d, 0x446e5786, 0x446ea5bd, 0x446ef3f4, 0x446f41fe, 0x446f9006, 0x446fde3c, 0x44702c74, 0x44707a7c, 0x4470c885, 0x447116bc, 0x447164f4, 0x4471b2fe, 0x44720104, 0x44724f3c, 0x44729d76, 0x4472eb7e, 0x44733986, 0x447387bd, 0x4473d5f6, 0x447423fe, 0x44747204, 0x4474c03c, 0x44750e76, 0x44755c7d, 0x4475aa83, 0x4475f8bc, 0x447646f4, 0x447694fc, 0x4476e302, 0x4477313c, 0x44777f76, 0x4477cd7c, 0x44781b82, 0x447869bc, 0x4478b7f7, 0x447905fe, 0x44795402, 0x4479a23c, 0x4479f076, 0x447a3e7c, 0x447a8c80, 0x447adabc, 0x447b28f8, 0x447b76fd, 0x447bc500, 0x447c133c, 0x447c6178, 0x447caf7c, 0x447cfd80, 0x447d4bbc, 0x447d99f8, 0x447de7fe, 0x447e3600, 0x447e843c, 0x447ed279, 0x447f207d, 0x447f6e80, 0x447fbcbc, 0x4480057c, 0x44802c7e, 0x44805380, 0x44807a9e, 0x4480a1be, 0x4480c8be, 0x4480efbf, 0x448116de, 0x44813dfe, 0x448164ff, 0x44818bff, 0x4481b31e, 0x4481da3d, 0x4482013e, 0x4482283e, 0x44824f5e, 0x4482767d, 0x44829d7e, 0x4482c47e, 0x4482eb9e, 0x448312be, 0x448339be, 0x448360be, 0x448387de, 0x4483aeff, 0x4483d5fe, 0x4483fcfd, 0x4484241e, 0x44844b3e, 0x4484723e, 0x4484993c, 0x4484c05e, 0x4484e77f, 0x44850e7e, 0x4485357c, 0x44855c9e, 0x448583c0, 0x4485aabe, 0x4485d1bc, 0x4485f8dd, 0x44862000, 0x448646fe, 0x44866dfb, 0x4486951d, 0x4486bc40, 0x4486e33e, 0x44870a3b, 0x4487315e, 0x44875881, 0x44877f7e, 0x4487a67a, 0x4487cd9e, 0x4487f4c1, 0x44881bbe, 0x448842ba, 0x448869de, 0x44889102, 0x4488b7ff, 0x4488defa, 0x4489061e, 0x44892d43, 0x4489543e, 0x44897b39, 0x4489a25e, 0x4489c984, 0x4489f07e, 0x448a1778, 0x448a3e9e, 0x448a65c4, 0x448a8cbe, 0x448ab3b7, 0x448adade, 0x448b0206, 0x448b28fe, 0x448b4ff6, 0x448b771e, 0x448b9e46, 0x448bc53e, 0x448bec36, 0x448c135e, 0x448c3a87, 0x448c617e, 0x448c8874, 0x448caf9e, 0x448cd6c8, 0x448cfdbf, 0x448d24b4, 0x448d4bdf, 0x448d730a, 0x448d9a00, 0x448dc0f4, 0x448de81f, 0x448e0f4b, 0x448e363e, 0x448e5d32, 0x448e845f, 0x448eab8c, 0x448ed27e, 0x448ef971, 0x448f209f, 0x448f47ce, 0x448f6ebe, 0x448f95b0, 0x448fbcdf, 0x448fe40f, 0x44900aff, 0x449031ed, 0x4490591e, 0x44908050, 0x4490a73e, 0x4490ce2c, 0x4490f55f, 0x44911c92, 0x4491437e, 0x44916a6a, 0x4491919f, 0x4491b8d4, 0x4491dfbe, 0x449206a8, 0x44922de0, 0x44925517, 0x44927bff, 0x4492a2e6, 0x4492ca1f, 0x4492f159, 0x4493183e, 0x44933f23, 0x44936660, 0x44938d9c, 0x4493b47e, 0x4493db60, 0x4494029f, 0x449429df, 0x449450be, 0x4494779c, 0x44949ee0, 0x4494c624, 0x4494ecfe, 0x449513d8, 0x44953b20, 0x44956268, 0x4495893d, 0x4495b012, 0x4495d760, 0x4495fead, 0x4496257d, 0x44964c4c, 0x449673a0, 0x44969af4, 0x4496c1bc, 0x4496e885, 0x44970fe2, 0x4497373d, 0x44975dfc, 0x449784bc, 0x4497ac23, 0x4497d388, 0x4497fa3c, 0x449820f0, 0x44984864, 0x44986fd6, 0x44989679, 0x4498bd1f, 0x4498e4a5, 0x44990c28, 0x449932b8, 0x44995948, 0x449980e8, 0x4499a886, 0x4499cef2, 0x4499f564, 0x449a1d2e, 0x449a44f2, 0x449a6b28, 0x449a9168, 0x449ab97e, 0x449ae185, 0x449b074f, 0x449b2d2e, 0x449b55f0, 0x449b7e8a, 0x449ba31a, 0x449bc801, 0x449bf3b8, 0x449c1de8, 0x449c302c, 0x449c1dea, 0x449bf3b9, 0x449bc802, 0x449ba31a, 0x449b7e8c, 0x449b55f2, 0x449b2d2f, 0x449b0751, 0x449ae186, 0x449ab980, 0x449a916a, 0x449a6b2a, 0x449a44f4, 0x449a1d30, 0x4499f566, 0x4499cef4, 0x4499a886, 0x449980ea, 0x44995949, 0x449932b8, 0x44990c2a, 0x4498e4a6, 0x4498bd20, 0x4498967a, 0x44986fd6, 0x44984864, 0x449820f1, 0x4497fa3c, 0x4497d389, 0x4497ac24, 0x449784be, 0x44975dfe, 0x4497373e, 0x44970fe2, 0x4496e886, 0x4496c1be, 0x44969af6, 0x449673a2, 0x44964c4d, 0x4496257e, 0x4495feae, 0x4495d762, 0x4495b014, 0x4495893e, 0x44956269, 0x44953b22, 0x449513d9, 0x4494ecff, 0x4494c624, 0x44949ee0, 0x4494779c, 0x449450be, 0x449429e0, 0x449402a1, 0x4493db62, 0x4493b480, 0x44938d9c, 0x44936660, 0x44933f24, 0x44931840, 0x4492f15a, 0x4492ca21, 0x4492a2e8, 0x44927c00, 0x44925518, 0x44922de2, 0x449206aa, 0x4491dfc0, 0x4491b8d6, 0x449191a1, 0x44916a6b, 0x44914380, 0x44911c94, 0x4490f561, 0x4490ce2e, 0x4490a740, 0x44908052, 0x44905921, 0x449031f0, 0x44900b00, 0x448fe410, 0x448fbce0, 0x448f95b0, 0x448f6ec0, 0x448f47d0, 0x448f20a1, 0x448ef972, 0x448ed280, 0x448eab8e, 0x448e8461, 0x448e5d34, 0x448e3640, 0x448e0f4d, 0x448de821, 0x448dc0f6, 0x448d9a01, 0x448d730c, 0x448d4be2, 0x448d24b6, 0x448cfdc1, 0x448cd6cb, 0x448cafa1, 0x448c8877, 0x448c6181, 0x448c3a8a, 0x448c1360, 0x448bec38, 0x448bc540, 0x448b9e49, 0x448b7721, 0x448b4ff9, 0x448b2900, 0x448b0208, 0x448adae1, 0x448ab3ba, 0x448a8cc0, 0x448a65c7, 0x448a3ea1, 0x448a177a, 0x4489f080, 0x4489c985, 0x4489a260, 0x44897b3b, 0x44895441, 0x44892d45, 0x44890620, 0x4488defc, 0x4488b801, 0x44889105, 0x448869e1, 0x448842bc, 0x44881bc1, 0x4487f4c4, 0x4487cda1, 0x4487a67c, 0x44877f80, 0x44875884, 0x44873161, 0x44870a3d, 0x4486e340, 0x4486bc43, 0x44869520, 0x44866dfe, 0x44864700, 0x44862002, 0x4485f8e0, 0x4485d1be, 0x4485aac0, 0x448583c2, 0x44855ca0, 0x4485357f, 0x44850e80, 0x4484e782, 0x4484c060, 0x4484993f, 0x44847241, 0x44844b42, 0x44842421, 0x4483fd00, 0x4483d601, 0x4483af02, 0x448387e1, 0x448360c0, 0x448339c1, 0x448312c2, 0x4482eba1, 0x4482c481, 0x44829d81, 0x44827680, 0x44824f61, 0x44822841, 0x44820141, 0x4481da40, 0x4481b321, 0x44818c02, 0x44816501, 0x44813e00, 0x448116e1, 0x4480efc2, 0x4480c8c1, 0x4480a1c0, 0x44807aa2, 0x44805382, 0x44802c81, 0x44800580, 0x447fbcc2, 0x447f6e85, 0x447f2083, 0x447ed27f, 0x447e8442, 0x447e3606, 0x447de802, 0x447d99fe, 0x447d4bc2, 0x447cfd86, 0x447caf82, 0x447c617e, 0x447c1342, 0x447bc506, 0x447b7702, 0x447b28fe, 0x447adac2, 0x447a8c87, 0x447a3e83, 0x4479f07e, 0x4479a242, 0x44795408, 0x44790602, 0x4478b7fc, 0x447869c2, 0x44781b88, 0x4477cd82, 0x44777f7c, 0x44773142, 0x4476e308, 0x44769502, 0x447646fa, 0x4475f8c2, 0x4475aa88, 0x44755c83, 0x44750e7b, 0x4474c043, 0x4474720a, 0x44742404, 0x4473d5fc, 0x447387c4, 0x4473398a, 0x4472eb84, 0x44729d7c, 0x44724f42, 0x4472010a, 0x4471b303, 0x447164fb, 0x447116c2, 0x4470c88a, 0x44707a83, 0x44702c7b, 0x446fde42, 0x446f900c, 0x446f4203, 0x446ef3fa, 0x446ea5c2, 0x446e578c, 0x446e0983, 0x446dbb7a, 0x446d6d44, 0x446d1f0b, 0x446cd102, 0x446c82f8, 0x446c34c2, 0x446be68c, 0x446b9883, 0x446b4a7a, 0x446afc43, 0x446aae0d, 0x446a6001, 0x446a11f6, 0x4469c3c1, 0x4469758a, 0x44692780, 0x4468d976, 0x44688b41, 0x44683d0a, 0x4467ef00, 0x4467a0f6, 0x446752c0, 0x4467048b, 0x4466b680, 0x44666876, 0x44661a40, 0x4465cc0b, 0x44657e00, 0x44652ff5, 0x4464e1c0, 0x4464938c, 0x44644580, 0x4463f776, 0x4463a940, 0x44635b0c, 0x44630d00, 0x4462bef4, 0x446270c1, 0x4462228c, 0x4461d482, 0x44618676, 0x44613841, 0x4460ea0d, 0x44609c01, 0x44604df6, 0x445fffc2, 0x445fb18e, 0x445f6382, 0x445f1576, 0x445ec740, 0x445e790c, 0x445e2b01, 0x445ddcf4, 0x445d8ec1, 0x445d408d, 0x445cf282, 0x445ca475, 0x445c5641, 0x445c080e, 0x445bba01, 0x445b6bf4, 0x445b1dc1, 0x445acf8d, 0x445a8181, 0x445a3374, 0x4459e542, 0x4459970e, 0x44594902, 0x4458faf4, 0x4458acc1, 0x44585e8e, 0x44581082, 0x4457c275, 0x44577442, 0x44572610, 0x4456d802, 0x445689f4, 0x44563bc2, 0x4455ed90, 0x44559f82, 0x44555175, 0x44550342, 0x4454b50f, 0x44546702, 0x445418f5, 0x4453cac3, 0x44537c90, 0x44532e83, 0x4452e075, 0x44529242, 0x44524410, 0x4451f602, 0x4451a7f4, 0x445159c2, 0x44510b90, 0x4450bd82, 0x44506f75, 0x44502142, 0x444fd310, 0x444f8502, 0x444f36f4, 0x444ee8c2, 0x444e9a90, 0x444e4c83, 0x444dfe74, 0x444db043, 0x444d6212, 0x444d1403, 0x444cc5f5, 0x444c77c4, 0x444c2992, 0x444bdb84, 0x444b8d76, 0x444b3f44, 0x444af112, 0x444aa304, 0x444a54f4, 0x444a06c3, 0x4449b892, 0x44496a84, 0x44491c75, 0x4448ce44, 0x44488012, 0x44483203, 0x4447e3f4, 0x444795c4, 0x44474792, 0x4446f984, 0x4446ab75, 0x44465d44, 0x44460f12, 0x4445c104, 0x444572f4, 0x444524c4, 0x4444d692, 0x44448885, 0x44443a75, 0x4443ec44, 0x44439e14, 0x44435004, 0x444301f4, 0x4442b3c4, 0x44426593, 0x44421784, 0x4441c974, 0x44417b44, 0x44412d12, 0x4440df04, 0x444090f4, 0x444042c4, 0x443ff493, 0x443fa684, 0x443f5875, 0x443f0a44, 0x443ebc13, 0x443e6e04, 0x443e1ff4, 0x443dd1c4, 0x443d8393, 0x443d3584, 0x443ce775, 0x443c9944, 0x443c4b13, 0x443bfd04, 0x443baef4, 0x443b60c4, 0x443b1293, 0x443ac485, 0x443a7675, 0x443a2845, 0x4439da15, 0x44398c05, 0x44393df6, 0x4438efc6, 0x4438a195, 0x44385386, 0x44380576, 0x4437b746, 0x44376916, 0x44371b05, 0x4436ccf5, 0x44367ec6, 0x44363095, 0x4435e286, 0x44359476, 0x44354645, 0x4434f816, 0x4434aa05, 0x44345bf5, 0x44340dc6, 0x4433bf96, 0x44337186, 0x44332376, 0x4432d546, 0x44328716, 0x44323906, 0x4431eaf6, 0x44319cc6, 0x44314e96, 0x44310087, 0x4430b276, 0x44306446, 0x44301616, 0x442fc806, 0x442f79f6, 0x442f2bc7, 0x442edd96, 0x442e8f86, 0x442e4176, 0x442df346, 0x442da516, 0x442d5706, 0x442d08f6, 0x442cbac6, 0x442c6c96, 0x442c1e87, 0x442bd076, 0x442b8247, 0x442b3417, 0x442ae606, 0x442a97f6, 0x442a49c7, 0x4429fb97, 0x4429ad86, 0x44295f76, 0x44291147, 0x4428c317, 0x44287506, 0x442826f6, 0x4427d8c7, 0x44278a97, 0x44273c87, 0x4426ee77, 0x4426a047, 0x44265217, 0x44260407, 0x4425b5f7, 0x442567c8, 0x44251998, 0x4424cb88, 0x44247d78, 0x44242f48, 0x4423e118, 0x44239308, 0x442344f7, 0x4422f6c8, 0x4422a898, 0x44225a88, 0x44220c78, 0x4421be48, 0x44217018, 0x44212207, 0x4420d3f7, 0x442085c8, 0x44203798, 0x441fe988, 0x441f9b78, 0x441f4d48, 0x441eff18, 0x441eb107, 0x441e62f7, 0x441e14c8, 0x441dc698, 0x441d7888, 0x441d2a77, 0x441cdc48, 0x441c8e18, 0x441c4000, 0x441bf1f0, 0x441ba3c1, 0x441b5591, 0x441b0781, 0x441ab970, 0x441a6b41, 0x441a1d11, 0x4419cf00, 0x441980f0, 0x441932c1, 0x4418e491, 0x44189681, 0x44184870, 0x4417fa41, 0x4417ac11, 0x44175e00, 0x44170ff0, 0x4416c1c1, 0x44167391, 0x44162581, 0x4415d770, 0x44158941, 0x44153b11, 0x4414ed00, 0x44149ef0, 0x441450c1, 0x44140290, 0x4413b480, 0x44136670, 0x44131841, 0x4412ca11, 0x44127c00, 0x44122df0, 0x4411dfc1, 0x44119192, 0x44114381, 0x4410f571, 0x4410a741, 0x44105912, 0x44100b01, 0x440fbcf0, 0x440f6ec2, 0x440f2091, 0x440ed282, 0x440e8471, 0x440e3642, 0x440de811, 0x440d9a00, 0x440d4bf0, 0x440cfdc1, 0x440caf91, 0x440c6181, 0x440c1371, 0x440bc541, 0x440b7711, 0x440b2901, 0x440adaf1, 0x440a8cc1, 0x440a3e91, 0x4409f081, 0x4409a271, 0x44095441, 0x44090612, 0x4408b801, 0x440869f1, 0x44081bc2, 0x4407cd91, 0x44077f81, 0x44073172, 0x4406e342, 0x44069511, 0x44064701, 0x4405f8f1, 0x4405aac2, 0x44055c91, 0x44050e82, 0x4404c072, 0x44047242, 0x44042412, 0x4403d601, 0x440387f1, 0x440339c2, 0x4402eb92, 0x44029d82, 0x44024f72, 0x44020142, 0x4401b312, 0x44016502, 0x440116f2, 0x4400c8c2, 0x44007a92, 0x44002c82, 0x43ffbce5, 0x43ff2084, 0x43fe8424, 0x43fde804, 0x43fd4be6, 0x43fcaf86, 0x43fc1326, 0x43fb7706, 0x43fadae8, 0x43fa3e86, 0x43f9a226, 0x43f90606, 0x43f869e6, 0x43f7cd87, 0x43f73126, 0x43f69508, 0x43f5f8e8, 0x43f55c88, 0x43f4c025, 0x43f42405, 0x43f387e9, 0x43f2eb88, 0x43f24f26, 0x43f1b307, 0x43f116e8, 0x43f07a87, 0x43efde26, 0x43ef4206, 0x43eea5e9, 0x43ee0987, 0x43ed6d26, 0x43ecd108, 0x43ec34e9, 0x43eb9887, 0x43eafc26, 0x43ea6004, 0x43e9c3e6, 0x43e92786, 0x43e88b24, 0x43e7ef05, 0x43e752e8, 0x43e6b686, 0x43e61a24, 0x43e57e04, 0x43e4e1e8, 0x43e44586, 0x43e3a924, 0x43e30d06, 0x43e270e9, 0x43e1d486, 0x43e13824, 0x43e09c05, 0x43dfffea, 0x43df6387, 0x43dec724, 0x43de2b07, 0x43dd8eea, 0x43dcf287, 0x43dc5624, 0x43dbba05, 0x43db1dea, 0x43da8187, 0x43d9e523, 0x43d94906, 0x43d8acea, 0x43d81087, 0x43d77422, 0x43d6d806, 0x43d63beb, 0x43d59f88, 0x43d50324, 0x43d46708, 0x43d3caec, 0x43d32e88, 0x43d29226, 0x43d1f607, 0x43d159eb, 0x43d0bd89, 0x43d02124, 0x43cf8508, 0x43cee8ec, 0x43ce4c88, 0x43cdb023, 0x43cd1405, 0x43cc77ec, 0x43cbdb88, 0x43cb3f24, 0x43caa308, 0x43ca06ee, 0x43c96a88, 0x43c8ce24, 0x43c83208, 0x43c795ee, 0x43c6f989, 0x43c65d23, 0x43c5c108, 0x43c524ee, 0x43c48888, 0x43c3ec23, 0x43c35006, 0x43c2b3ee, 0x43c2178a, 0x43c17b23, 0x43c0df08, 0x43c042ef, 0x43bfa68a, 0x43bf0a24, 0x43be6e07, 0x43bdd1ef, 0x43bd3589, 0x43bc9922, 0x43bbfd09, 0x43bb60f0, 0x43bac48a, 0x43ba2822, 0x43b98c07, 0x43b8eff0, 0x43b8538a, 0x43b7b723, 0x43b71b0a, 0x43b67ef1, 0x43b5e28b, 0x43b54622, 0x43b4aa08, 0x43b40df2, 0x43b3718a, 0x43b2d522, 0x43b23909, 0x43b19cf2, 0x43b1008a, 0x43b06421, 0x43afc809, 0x43af2bf1, 0x43ae8f8a, 0x43adf322, 0x43ad570a, 0x43acbaf4, 0x43ac1e8b, 0x43ab8223, 0x43aae60a, 0x43aa49f5, 0x43a9ad8c, 0x43a91121, 0x43a8750b, 0x43a7d8f5, 0x43a73c8c, 0x43a6a020, 0x43a60409, 0x43a567f6, 0x43a4cb8d, 0x43a42f21, 0x43a3930b, 0x43a2f6f8, 0x43a25a8b, 0x43a1be21, 0x43a1220a, 0x43a085f8, 0x439fe98b, 0x439f4d21, 0x439eb10a, 0x439e14f7, 0x439d788b, 0x439cdc1f, 0x439c4003, 0x439ba3f1, 0x439b0786, 0x439a6b19, 0x4399cf05, 0x439932f2, 0x43989686, 0x4397fa1a, 0x43975e04, 0x4396c1f4, 0x43962586, 0x43958918, 0x4394ed06, 0x439450f4, 0x4393b486, 0x43931818, 0x43927c03, 0x4391dff5, 0x43914387, 0x4390a717, 0x43900b07, 0x438f6ef6, 0x438ed288, 0x438e3617, 0x438d9a05, 0x438cfdf7, 0x438c6187, 0x438bc515, 0x438b2904, 0x438a8cf5, 0x4389f086, 0x43895413, 0x4388b804, 0x43881bf8, 0x43877f88, 0x4386e315, 0x43864706, 0x4385aafa, 0x43850e88, 0x43847217, 0x4383d607, 0x438339fb, 0x43829d88, 0x43820114, 0x43816508, 0x4380c8fc, 0x43802c88, 0x437f2024, 0x437de80a, 0x437caffa, 0x437b7710, 0x437a3e26, 0x4379060e, 0x4377cdfe, 0x43769510, 0x43755c22, 0x4374240c, 0x4372ec02, 0x4371b312, 0x43707a22, 0x436f4210, 0x436e0a00, 0x436cd110, 0x436b9820, 0x436a600a, 0x436927fe, 0x4367ef10, 0x4366b61c, 0x43657e0c, 0x43644602, 0x43630d10, 0x4361d41c, 0x43609c0c, 0x435f6404, 0x435e2b0e, 0x435cf214, 0x435bba0c, 0x435a8206, 0x4359490e, 0x43581014, 0x4356d80a, 0x4355a008, 0x43546712, 0x43532e16, 0x4351f612, 0x4350be0e, 0x434f8512, 0x434e4c16, 0x434d1410, 0x434bdc10, 0x434aa312, 0x43496a10, 0x4348320c, 0x4346fa12, 0x4345c10e, 0x4344880a, 0x4343500e, 0x43421816, 0x4340df12, 0x433fa60e, 0x433e6e10, 0x433d361c, 0x433bfd14, 0x433ac40a, 0x43398c12, 0x43385420, 0x43371b14, 0x4335e204, 0x4334aa14, 0x43337224, 0x43323916, 0x43310002, 0x432fc814, 0x432e902a, 0x432d5716, 0x432c1dfe, 0x432ae614, 0x4329ae2a, 0x43287510, 0x43273bfa, 0x43260410, 0x4324cc30, 0x43239312, 0x432259f6, 0x4321220e, 0x431fea34, 0x431eb10e, 0x431d77ec, 0x431c400a, 0x431b0834, 0x4319cf10, 0x431895e8, 0x43175e0c, 0x43162638, 0x4314ed0c, 0x4313b3e4, 0x43127c10, 0x43114440, 0x43100b0e, 0x430ed1dc, 0x430d9a0e, 0x430c6246, 0x430b290c, 0x4309efd4, 0x4308b80c, 0x4307804c, 0x43064710, 0x43050dd0, 0x4303d612, 0x43029e52, 0x4301650e, 0x43002bc6, 0x42fde81c, 0x42fb78b8, 0x42f90618, 0x42f6937c, 0x42f42410, 0x42f1b4bc, 0x42ef420c, 0x42eccf5c, 0x42ea6008, 0x42e7f0c8, 0x42e57e10, 0x42e30b54, 0x42e09c18, 0x42de2ce0, 0x42dbba10, 0x42d94740, 0x42d6d818, 0x42d468f0, 0x42d1f610, 0x42cf8328, 0x42cd1418, 0x42caa508, 0x42c83210, 0x42c5bf10, 0x42c35010, 0x42c0e130, 0x42be6e18, 0x42bbfb00, 0x42b98c18, 0x42b71d40, 0x42b4aa10, 0x42b236e0, 0x42afc820, 0x42ad5968, 0x42aae610, 0x42a872c8, 0x42a60418, 0x42a39580, 0x42a12208, 0x429eae90, 0x429c4010, 0x4299d1a0, 0x42975e10, 0x4294ea70, 0x42927c18, 0x42900dd0, 0x428d9a08, 0x428b2648, 0x4288b818, 0x42864a00, 0x4283d610, 0x42816210, 0x427de850, 0x42790c80, 0x42742400, 0x426f3b90, 0x426a6040, 0x42658510, 0x42609c00, 0x425bb310, 0x4256d860, 0x4251fdb0, 0x424d13f0, 0x42482a60, 0x42435060, 0x423e7690, 0x42398bf0, 0x4234a180, 0x422fc870, 0x422aef60, 0x422603d0, 0x42211860, 0x421c4070, 0x42176870, 0x42127ba0, 0x420d8f10, 0x4208b890, 0x4203e210, 0x41fde700, 0x41f40aa0, 0x41ea61c0, 0x41e0b840, 0x41d6d6c0, 0x41ccf5e0, 0x41c35220, 0x41b9ade0, 0x41afc5e0, 0x41a5dea0, 0x419c4360, 0x4192a700, 0x4188b480, 0x417d8700, 0x416a6bc0, 0x41574c00, 0x41434100, 0x412f3d80, 0x411c5880, 0x41096940, 0x40ea1000, 0x40c17580, 0x409ce680, 0x406ffe00, 0x40189000, 0x3f886000
};

int sin_sheet[] ={0, 0x3f800000, 0x3f3504f3, 0x3ec3ef16, 0x3e47c5c2, 0x3dc8bd36, 0x3d48fb30, 0x3cc90ab0, 0x3c490e90, 0x3bc90f88, 0x3b490fc6, 0x3ac90fd6};

#define KERNEL(...) #__VA_ARGS__

const CALchar * OPT_FFT_KERNEL=KERNEL(
il_ps_2_0
dcl_input_position_interp(linear_noperspective) vWinCoord0.xy__
dcl_cb cb0[1024]
dcl_literal l0, 0,0x1,0x2,0x4
dcl_literal l1, 0x100, 0x200, 0x400, 0x800 //256, 512, 1024, 2048
dcl_literal l2, -2.0, 1.0, 0.0, -1.0 
dcl_literal l3, 2048.0, 0, 0, 0
dcl_indexed_temp_array x0[2048]
flr r0.xy__, vWinCoord0.xyxy
ftou r0, r0
umad r0.__z_, r0.x, l0.z, r0.y  //TODO l0.z should be the y threshold
//imul r0.__z_, r0.z, l1.w		//get the base index of current thread
//mov g[r0.z].x_z_, r0.yx
ftou r1, r1
call 3
call 5
call 4
endmain
func1
ftou r1, r1
mov r1.x___, l0.x //init index
mov r1._y__, l0.yy  //index increamental
mov r1.__z_, l1.yyy //index upper boundwhileloop 512
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	umad r0.___w, r0.z, l1.w, r1.x		//index of current
	if_logicalnz cb0[r1.x].x
		mov r1.___w, cb0[r1.x].xxxx		//index offset of target
		mov x0[r1.w], g[r0.w]
	else
		mov x0[r1.x], g[r0.w]
	endif
	iadd r1.x___, r1.x, r1.y
endloop
ret
endfunc
func2
ftou r1, r1
mov r1.x___, l0.x //init index
mov r1._y__, l0.yy  //index increamental
mov r1.__z_, l1.www //index upper boundwhileloop
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	umad r0.___w, r0.z, l1.w, r1.x	//index of target
	mov g[r0.w], x0[r1.x]
	iadd r1.x___, r1.x, r1.y
endloop
ret
endfunc
func3
ftoi r3, r3
mov r1.x___, l0.y //init index r1.x= mmax = 1
mov r1.__z_, l1.www //index upper bound
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	ishl r1._y__, r1.x, l0.y // r1.y = istep = mmax<<1

	mov r2.x___, cb0[r3.x].y  //r2.x = wpi = sin(theta);
	iadd r3.x___, r3.x, l0.y 
	mov r2._y__, cb0[r3.x].y  //r2.y = wtemp = sin(0.5*theta)
	mul r2._y__, r2.y, r2.y
	mul r2._y__, r2.y, l2.x //r2.y = wpr = -2.0*wtemp*wtemp

	mov r2.__z_, l2.y //r2.z = wr = 1.0;
	mov r2.___w, l2.z //r2.w = wi = 0.0;

	mov r3._y__, l0.x //r3.y = m = 0
	whileloop
		uge r1.___w, r3.y, r1.x	//r3.y = m<mmax = r1.x
		break_logicalnz r1.w
		mov r3.__z_, r3.y		// r3.z = i = m
		whileloop
			uge r1.___w, r3.z, l1.w	//r3.z = i<2048
			break_logicalnz r1.w
			//absolute index of i
			umad r0.___w, r0.z, l1.w, r3.z 
			//absolute index r3.w = j = i+mmax = r3.z + r1.x
			iadd r3.___w, r0.w, r1.x	

			//mov g[r0.w], r0.w 
			//mov g[r3.w], r3.w
			
			// tempr = wr*data[j] - wi*data[j+1]
			mul r4.x_z_, g[r3.w].xz, r2.z
			mul r4._y_w, g[r3.w].yw, r2.w
			sub r5.x_z_, r4.xz, r4.yw

			// tempi = wr*data[j+1] + wi*data[j]
			mul r4.x_z_, g[r3.w].yw, r2.z
			mul r4._y_w, g[r3.w].xz, r2.w
			add r5._y_w, r4.xz, r4.yw
			
			//data[j] = data[i] - tempr
			sub g[r3.w].x_z_, g[r0.w].xz, r5.xz

			//data[j+1] = data[i+1] - tempi
			sub g[r3.w]._y_w, g[r0.w].yw, r5.yw
			
			//data[i] = data[i] + tempr
			add g[r0.w].x_z_, g[r0.w].xz, r5.xz
			
			//data[i+1] = data[i+1] + tempi
			add g[r0.w]._y_w, g[r0.w].yw, r5.yw
			
			iadd r3.__z_, r3.z, r1.y		//r3.z = i+=istep = r1.y
		endloop
		
		//wr*wpr-wi*wpi+wr
		mul r4.x___, r2.z, r2.y	//wr*wpr
		mul r4._y__, r2.x, r2.w	//wi*wpi
		sub r4.x, r4.x, r4.y
		add r4.x, r4.x, r2.z

		//wi*wpr+wr*wpi+wi
		mul r4.__z_, r2.w, r2.y
		mul r4.___w, r2.z, r2.x
		add r4.__z_, r4.z, r4.w
		add r4.__z_, r4.x, r2.w

		mov r2.__z_, r4.x		//wr = wr*wpr-wi*wpi+wr
		mov r2.___w, r4.z		//wi = wi*wpr+wr*wpi+wi

		iadd r3._y__, r3.y, l0.y	// r3.y++ m++
	endloop

	mov r1.x___, r1.y // r1.y = mmax = istep
endloop
ret
endfunc

func4
ftoi r3, r3
mov r1.x___, l0.y //init index r1.x= mmax = 1
mov r1.__z_, l1.www //index upper bound
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	ishl r1._y__, r1.x, l0.y // r1.y = istep = mmax<<1

	mov r2.x___, cb0[r3.x].y  //r2.x = wpi = sin(theta);
	mul r2.x___, r2.x, l2.w  //r2.x = wpi = -wpi

	iadd r3.x___, r3.x, l0.y 
	mov r2._y__, cb0[r3.x].y  //r2.y = wtemp = sin(0.5*theta)
	mul r2._y__, r2.y, r2.y
	mul r2._y__, r2.y, l2.x //r2.y = wpr = -2.0*wtemp*wtemp

	mov r2.__z_, l2.y //r2.z = wr = 1.0;
	mov r2.___w, l2.z //r2.w = wi = 0.0;

	mov r3._y__, l0.x //r3.y = m = 0
	whileloop
		uge r1.___w, r3.y, r1.x	//r3.y = m<mmax = r1.x
		break_logicalnz r1.w
		mov r3.__z_, r3.y		// r3.z = i = m
		whileloop
			uge r1.___w, r3.z, l1.w	//r3.z = i<2048
			break_logicalnz r1.w
			//absolute index of i
			umad r0.___w, r0.z, l1.w, r3.z 
			//absolute index r3.w = j = i+mmax = r3.z + r1.x
			iadd r3.___w, r0.w, r1.x
			
			// tempr = wr*data[j] - wi*data[j+1]
			mul r4.x_z_, g[r3.w].xz, r2.z
			mul r4._y_w, g[r3.w].yw, r2.w
			sub r5.x_z_, r4.xz, r4.yw

			// tempi = wr*data[j+1] + wi*data[j]
			mul r4.x_z_, g[r3.w].yw, r2.z
			mul r4._y_w, g[r3.w].xz, r2.w
			add r5._y_w, r4.xz, r4.yw
			
			//data[j] = data[i] - tempr
			sub g[r3.w].x_z_, g[r0.w].xz, r5.xz

			//data[j+1] = data[i+1] - tempi
			sub g[r3.w]._y_w, g[r0.w].yw, r5.yw
			
			//data[i] = data[i] + tempr
			add g[r0.w].x_z_, g[r0.w].xz, r5.xz
			
			//data[i+1] = data[i+1] + tempi
			add g[r0.w]._y_w, g[r0.w].yw, r5.yw
			
			iadd r3.__z_, r3.z, r1.y		//r3.z = i+=istep = r1.y
		endloop
		
		//wr*wpr-wi*wpi+wr
		mul r4.x___, r2.z, r2.y	//wr*wpr
		mul r4._y__, r2.x, r2.w	//wi*wpi
		sub r4.x, r4.x, r4.y
		add r4.x, r4.x, r2.z

		//wi*wpr+wr*wpi+wi
		mul r4.__z_, r2.w, r2.y
		mul r4.___w, r2.z, r2.x
		add r4.__z_, r4.z, r4.w
		add r4.__z_, r4.x, r2.w

		mov r2.__z_, r4.x		//wr = wr*wpr-wi*wpi+wr
		mov r2.___w, r4.z		//wi = wi*wpr+wr*wpi+wi

		iadd r3._y__, r3.y, l0.y	// r3.y++ m++
	endloop

	mov r1.x___, r1.y // r1.y = mmax = istep
endloop

mov r1.x___, l0.x //init index r1.x = 0
mov r1._y__, l0.yy  //index increamental
mov r1.__z_, l1.www //index upper bound
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	umad r0.___w, r0.z, l1.w, r1.x
	div g[r0.w], g[r0.w], l3.x
	iadd r1.x___, r1.x, r1.y
endloop

ret
endfunc

func5
mov r1.x___, l0.x //init index r1.x = 0
mov r1._y__, l0.yy  //index increamental 
mov r1.__z_, l1.zzz //index upper bound 1024
whileloop
	uge r1.___w, r1.x, r1.z
	break_logicalnz r1.w
	ishl r1.___w, r1.x, l0.y			//r1.w = r1.x*2
	umad r0.___w, r0.z, l1.w, r1.w  //absolute index
	mov r2.x___, cb0[r1.x].z
	mul g[r0.w], g[r0.w], r2.x
	//mov g[r0.w], r2.x
	iadd r0.___w, r0.w, l0.y
	mov r2.x___, cb0[r1.x].w
	mul g[r0.w], g[r0.w], r2.x
	//mov g[r0.w], r2.x
	iadd r1.x___, r1.x, r1.y
endloop
ret
endfunc
end
);

//////////////////////////////////////////////////////////////////////////
//*kernel void input_asm_table(out int odata<>, int sizebit)
//*{
//*    int k;
//*    int i = instance().x;
//*    int o = 0;
//*    for(k = 0; k < sizebit; k++)
//*    {
//*        o = (o << 1) | (i & 1);
//*        i = i >> 1;
//*    }
//*    odata = o;
//*}
//////////////////////////////////////////////////////////////////////////
const CALchar * _INPUT_ASM_TBL_GEN_KERNEL_ = KERNEL(
    il_ps_2_0
    dcl_literal l0, 0x00000000, 0x00000001, 0x00000000, 0x00000000
    dcl_output_generic o0
    dcl_input_position_interp(linear_noperspective) v0.xy__
    dcl_cb cb0[1]
    mov r1.x___, v0			// i = instance().x;
    ftoi r1.x___, r1.xxxx 	// int i = instance().x;
    mov r2.x___, cb0[0].xxxx // bitsize
    mov r5.x___, l0.xxxx // o = 0
    mov r3.x___, l0.xxxx // k = 0
    whileloop
    ilt r4.x___, r3.x000, r2.x000 	// if(k < bitsize)
    break_logicalz r4.x000		// break
    ishl r6.x___, r5.x000, l0.y000	// tmp1 = o << 1
    and r7.x___, r1.x000, l0.y000 // tmp2 = i & 1
    ior r5.x___, r6.x000, r7.x000 // o = (o << 1) | (i & 1)
    ishr r1.x___, r1.x000, l0.y000 // i = i >> 1;
    iadd r3.x___, r3.x000, l0.y000 // k++;
    endloop
    mov o0, r5
    endmain
    end
);

//////////////////////////////////////////////////////////////////////////
//*kernel void input_asm(out float4 out_data<>, float in_data[][], int input_asm_tbl[])
//*{
//*     int2 i1, i2;
//*     float4 o;
//*     int2 idx = instance().xy;
//*     int rev_idx = input_asm_tbl[idx.x];
//*
//*     i1.x = rev_idx;
//*     i1.y = 2 * idx.y;
//*
//*     i2.x = rev_idx;
//*     i2.y = 2 * idx.y + 1;
//*
//*     o.x = float4(in_data[i1.y][i1.x], 0, in_data[i2.y][i2.x], 0);
//*     out_data = o;
//*}
//////////////////////////////////////////////////////////////////////////
const CALchar * _INPUT_ASM_KERNEL_ = KERNEL(
    il_ps_2_0
);



#endif